package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.User;
import com.fz.us.admin.dict.entity.DictItem;

import javax.persistence.*;
import java.util.Date;

/**
 * 业务实体类 - 公司资质登记表
 * ============================================================================
 * 版权所有 2016 。
 *
 * @author XuHeng
 * @version 1.0 2016-12-21 。
 * ============================================================================
 */
@Entity
@Table(name="ec_certificate")
public class Certificate extends BaseFlowEntity {

    private static final long serialVersionUID = -1995113173083353454L;

    /**
     * 资质类别   1:○企业证照  2:○企业资质
     */
    private int certType;
    /**
     * 资质字典项
     */
    private DictItem certDictItem;
    /**
     * 证书/资质号
     */
    private String certNo;
    /**
     * 办理人员
     */
    private User handler;
    private String handlerId;
    /**
     * 评定日期
     */
    private Date datEvaluate;
    /**
     * 有效期
     */
    private Date datValid;

    /**
     * 提交日期
     */
    private Date dateApply;
    /**
     * 文档状态数值
     */
    private int numStatus;
    /**
     * 文档状态文字
     */
    private String txtStatus;

    /**
     * 表单名称
     */
    private String form;

    @Column(nullable=false, columnDefinition = "varchar(50) default '公司资质登记表'")
    public String getForm() {
        return form;
    }

    public void setForm(String form) {
        this.form = form;
    }

    public int getCertType() {
        return certType;
    }

    public void setCertType(int certType) {
        this.certType = certType;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public DictItem getCertDictItem() {
        return certDictItem;
    }

    public void setCertDictItem(DictItem certDictItem) {
        this.certDictItem = certDictItem;
    }

    public String getCertNo() {
        return certNo;
    }

    public void setCertNo(String certNo) {
        this.certNo = certNo;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public User getHandler() {
        return handler;
    }

    public void setHandler(User handler) {
        this.handler = handler;
    }

    public Date getDatEvaluate() {
        return datEvaluate;
    }

    public void setDatEvaluate(Date datEvaluate) {
        this.datEvaluate = datEvaluate;
    }

    public Date getDatValid() {
        return datValid;
    }

    public void setDatValid(Date datValid) {
        this.datValid = datValid;
    }

    public Date getDateApply() {
        return dateApply;
    }

    public void setDateApply(Date dateApply) {
        this.dateApply = dateApply;
    }

    public int getNumStatus() {
        return numStatus;
    }

    public void setNumStatus(int numStatus) {
        this.numStatus = numStatus;
    }

    public String getTxtStatus() {
        return txtStatus;
    }

    public void setTxtStatus(String txtStatus) {
        this.txtStatus = txtStatus;
    }

    public String getHandlerId() {
        return handlerId;
    }

    public void setHandlerId(String handlerId) {
        this.handlerId = handlerId;
    }
}
